package Array;
/*
*数组元素反向
* */
public class Array3 {
    public static void main(String[] args) {
        int[] array = {1,11,21,31,41,51,61,71,81};

//        正向输出
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i] + "  ");
        }

//        调转元素
        int temp;
        for(int i = 0; i < array.length/2; i++){
            temp = array[i];
            array[i] = array[array.length-1-i];
            array[array.length-1-i] = temp;
        }
        System.out.println("\n********************************************");

//        输出反向
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i] + "  ");
        }
    }
}
